Event.observe(window,'load',function(){

	$$('table tr td').each(function(current){
		Sortable.create(
			current,
			{
				tag:"p",
				constraint:false,
				containment:$$("table tr td"),
				dropOnEmpty: true,
				scroll: window,				
				pal: updateTask
			}
		);
	});

	function updateTask(el){
		new Ajax.Request("/tasks/update_date_task", {
			method: 'get',
			parameters: {
				"id": el.id,
				"timestamp": el.up().id
			},
			onSuccess: function(transport) {
				console.log(transport.responseText);
			}
		});
	}


	
	
});